<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="condition_store_links2" id="panel_apf_id_9">
  <div>
    <div class="condition_title">
      售价：
    </div>
    <div class="container">
      <a href="javascript:guideSearch('price','');" title="不限" id="price">不限</a>
      <a href="javascript:guideSearch('price','0-30');" title="30万以下" id="price0-30">30万以下</a>
      <a href="javascript:guideSearch('price','30-40');" title="30-40万元" id="price30-40">30-40万</a>
      <a href="javascript:guideSearch('price','40-50');" title="40-50万元" id="price40-50">40-50万</a>
      <a href="javascript:guideSearch('price','50-60');" title="50-60万元" id="price50-60">50-60万</a>
      <a href="javascript:guideSearch('price','60-80');" title="60-80万元" id="price60-80">60-80万</a>
      <a href="javascript:guideSearch('price','80-100');" title="80-100万元" id="price80-100">80-100万</a>
      <a href="javascript:guideSearch('price','100-120');" title="100-120万元" id="price100-120">100-120万</a>
      <a href="javascript:guideSearch('price','120-150');" title="120-150万元" id="price120-150">120-150万</a>
      <a href="javascript:guideSearch('price','150-200');" title="150-200万元" id="price150-200">150-200万</a>
      <a href="javascript:guideSearch('price','200-');" title="200万以上" id="price200-">200万以上</a>
    </div>
  </div>

  <div>
    <div class="condition_title">面积：</div>
    <div class="container">
      <a href="javascript:guideSearch('size','')" title="不限" id="size">不限</a>
      <a href="javascript:guideSearch('size','0-50')" title="50平米以下" id="size0-50">50平米以下</a>
      <a href="javascript:guideSearch('size','50-70')" title="50-70平米" id="size50-70">50-70平米</a>
      <a href="javascript:guideSearch('size','70-90')" title="70-90平米" id="size70-90">70-90平米</a>
      <a href="javascript:guideSearch('size','90-120')" title="90-120平米" id="size90-120">90-120平米</a>
      <a href="javascript:guideSearch('size','120-150')" title="120-150平米" id="size120-150">120-150平米</a>
      <a href="javascript:guideSearch('size','150-200')" title="150-200平米" id="size150-200">150-200平米</a>
      <a href="javascript:guideSearch('size','200-300')" title="200-300平米" id="size200-300">200-300平米</a>
      <a href="javascript:guideSearch('size','300-')" title="300平米以上" id="size300-">300平米以上</a>
    </div>
  </div>

  <div>
    <div class="condition_title">房型：</div>
    <div class="container">
      <a href="javascript:guideSearch('room','');" title="不限" id="room">不限</a>

      <a href="javascript:guideSearch('room','0-1');" title="一室" id="room0-1">一室</a>

      <a href="javascript:guideSearch('room','1-2');" title="二室" id="room1-2">二室</a>

      <a href="javascript:guideSearch('room','2-3');" title="三室" id="room2-3">三室</a>

      <a href="javascript:guideSearch('room','3-4');" title="四室" id="room3-4">四室</a>

      <a href="javascript:guideSearch('room','4-5');" title="五室" id="room4-5">五室</a>

      <a href="javascript:guideSearch('room','5-');" title="五室以上" id="room5-">五室以上</a>
    </div>
  </div>

  <div class="mb10 ml10">
      <input type="text" name="__keywords__" id="__keywords__" placeholder="关键字搜索" value="${param.keywords}"/>&nbsp;&nbsp;
      <input type="button" value="搜索" onclick="keywordsSearch()">&nbsp;&nbsp;
      <input type="button" value="清空" onclick="clearSearch()">
  </div>

</div>
<form id="guideForm">
  <input type="hidden" name="keywords" value="${param.keywords}"/>
  <input type="hidden" name="price" value="${param.price}"/>
  <input type="hidden" name="house_size" value="${param.house_size}"/>
  <input type="hidden" name="room" value="${param.room}"/>
</form>
<script>
  function guideSearch(name, val) {
    if (name == 'area') {
      $("input[name=area_id]").val(val);
    }
    if (name == 'price') {
      $("input[name=price]").val(val);
    }
    if (name == 'size') {
      $("input[name=house_size]").val(val);
    }
    if (name == 'room') {
      $("input[name=room]").val(val);
    }
    if (name == 'keywords') {
      $("input[name=keywords]").val(val);
    }
    var param = $("#guideForm").serialize();
    <c:if test="${publicState==1}">
    location.href="${ctx}/my/seller/myGoods.htm?"+param;
    </c:if>
    <c:if test="${publicState==0}">
    location.href="${ctx}/my/seller/myGoodsNot.htm?"+param;
    </c:if>
  }

  function keywordsSearch(){
    var keywords = $("#__keywords__").val();
    guideSearch("keywords",keywords);
  }

  function clearSearch(){
    <c:if test="${publicState==1}">
    location.href="${ctx}/my/seller/myGoods.htm";
    </c:if>
    <c:if test="${publicState==0}">
    location.href="${ctx}/my/seller/myGoodsNot.htm";
    </c:if>
  }

  $(function(){
    $("#price${param.price}").addClass("selected");
    $("#size${param.house_size}").addClass("selected");
    $("#room${param.room}").addClass("selected");
  });
</script>